const express = require('express');
const jobController = require('../controllers/jobController');
const authController = require('../controllers/authController');

const router = express.Router();

// Public routes
router.get('/nearby', jobController.getNearbyJobs);
router.get('/latest', jobController.getLatestJobs);
router.get('/search', jobController.searchJobs);
router.get('/:id', jobController.getJob);

// Protected routes example (if needed later)
// router.use(authController.protect);
// router.post('/save/:id', userController.saveJob);

module.exports = router; 